/*
 * Ellipse.cpp
 *
 *  Created on: 27 janv. 2010
 *      Author: id2856
 */


#include "Ellipse.h"


Ellipse::Ellipse(wxWindow * parent,wxColor* col) : Dessin(parent,col){}



void Ellipse::OnPaint(wxPaintEvent &event){
    wxPaintDC dc (this);
    dc.SetPen(wxPen(GetForegroundColour()));
    dc.SetBrush(wxBrush(GetForegroundColour()));
    dc.DrawEllipse(0,0,(int) Dessin::GetSize().GetWidth(),(int) Dessin::GetSize().GetHeight());

}

void Ellipse::paintMeLikeYou(wxWindow* window){
    wxPaintDC dc (window);
    dc.SetPen(wxPen(GetForegroundColour()));
    dc.SetBrush(wxBrush(GetForegroundColour()));
    dc.DrawEllipse(0,0,(int) window->GetSize().GetWidth(),(int) window->GetSize().GetHeight());

}

/*
Dessin* Ellipse::disconnectedCopy(){
    Dessin* copie = new Ellipse(*((Ellipse*) this));
    copie->Disconnect(wxEVT_PAINT, wxPaintEventHandler(Dessin::OnPaint)) ;
    copie->Disconnect(wxEVT_SIZE, wxSizeEventHandler (Dessin::OnSize)) ;
    copie->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(Dessin::OnMousePressed)) ;
    copie->Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(Dessin::OnRelease)) ;
    copie->Disconnect(wxEVT_MOTION ,wxMouseEventHandler (Dessin::OnMotion)) ;
}
*/
